﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Import Namespace="ThietBiSo.LinQDB" %>
<%@ Import Namespace="ThietBiSo.Models" %>
<%@ Import Namespace="ThietBiSo.UrlReview" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%
      
        MSeo mseo = new MSeo();
        var stitle = mseo.Title();

     
      
    %>
    <%:stitle %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%
        SEOUrl s = new SEOUrl();
        MTinTuc mtt = new MTinTuc();
        int totaltt = mtt.GetTotal_TrangChu();
        MDichVuChung mdvc = new MDichVuChung();
        var vdvc = mdvc.FindAll();

        MXayDung mxd = new MXayDung();
        var vxd = mxd.FindAll();
        int totalxd = mxd.GetTotal();
    %>
    <div class="ptvbotronsp" style="float: left">
        <div class="ptvhead_title" style="float">
            <h1 style="float: left; text-transform: uppercase">
                SẢN PHẨM</h1>
            <%-- <div style="float: right; margin-right: 5px; font-weight: bold">
                    <a href="<%=Url.Action("p", "sanpham") %>" style="color: White">Xem thêm</a></div>--%>
        </div>
        <% foreach (SanPham item in (List<SanPham>)ViewData["sanphams"])
           {%>
        <div class="ptvproducs" style="height: 300px;">
            <div class="ptvhinhsp">
                <div class="ptvhinhimg">
                    <a href="<%:Url.Action("chitiet", "sanpham",new{id=item.MaSP+"_"+s.GenerateURL(item.TenSP)})%>"
                        data-tooltip="ptvsticky<%:item.MaSP %>" title="<%:item.TenSP %>">
                        <%if (item.HinhAnh == "" || item.HinhAnh == null || item.HinhAnh == "noImage")
                          {%>
                        <img src="<%:Url.Content("~/Content/images/nophoto.gif")%>" alt="" width="140px;"
                            height="250" />
                        <%}
                          else
                          { %>
                        <img class="ptvsp" src="<%: item.HinhAnh%>" width="140" height="250" title="<%:item.TenSP %>"
                            alt="<%:item.TenSP %>" style="border: 0" />
                        <%} %>
                    </a>
                </div>
            </div>
            <div class="ptvtensp">
                <a href="<%:Url.Action("chitiet", "sanpham",new{id=item.MaSP+"_"+s.GenerateURL(item.TenSP)})%>">
                    <%:item.TenSP%></a>
            </div>
        </div>
        <%}
        %>
        <div class="ptvclear">
        </div>
    </div>
    <%--Dịch vụ--%>
    <%-- <div class="ptvbotronsp" style="float: left">
        <div class="ptvhead_title" style="float">
            <h1 style="float: left; text-transform: uppercase">
                Dịch vụ</h1>
            <%-- <div style="float: right; margin-right: 5px; font-weight: bold">
                    <a href="<%=Url.Action("p", "sanpham") %>" style="color: White">Xem thêm</a></div>
        </div>
        <div style=" margin:10px 10px 10px 10px; text-align:justify">
            <%=System.Net.WebUtility.HtmlDecode(vdvc)%>
        </div>
        <div class="ptvclear">
        </div>
    </div>--%>
    <%
        if (totalxd > 0)
        {
    %>
    <div class="ptvbotronsp" style="float: left">
        <div class="ptvhead_title" style="float">
            <h1 style="float: left; text-transform: uppercase">
                Xây dựng</h1>
            <%-- <div style="float: right; margin-right: 5px; font-weight: bold">
                    <a href="<%=Url.Action("p", "sanpham") %>" style="color: White">Xem thêm</a></div>--%>
        </div>
        <table id="results" border="0" width="100%">
            <% foreach (XayDung item in (List<XayDung>)ViewData["xaydungs"])
               {               
            %>
            <tr>
                <td align="left" style="padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid #CCCCCC;">
                    <a href="<%:Url.Action("chitiet", "xd",new{id=item.MaXayDung+"_"+s.GenerateURL(item.TieuDe)})%>">
                        <%if (item.HinhAnh == null || item.HinhAnh == "noImage" || item.HinhAnh == "")
                          { %>
                        <img style="margin-right: 10px; margin-left: 10px;" align="left" width="160" border="0"
                            src="<%:Url.Content("~/Content/images/nophoto.gif")%>" alt="" height="110px" />
                        <%}
                          else
                          { %>
                        <img style="margin-right: 10px; margin-left: 10px;" align="left" width="160" src="<%:item.HinhAnh %>"
                            alt="" border="0" height="110" /><%} %>
                    </a>
                    <div style="margin-bottom: 5px; color: #195B8E; font-weight: bold; padding: 0 10px 0 10px;">
                        <a href="<%:Url.Action("chitiet", "xd",new{id=item.MaXayDung+"_"+s.GenerateURL(item.TieuDe)})%>">
                            <%:item.TieuDe%>
                        </a>
                    </div>
                    <div style="text-align: justify; padding: 0 10px 0 10px;">
                        <%: item.NoiDungTomTat%>
                    </div>
                </td>
            </tr>
            <% } %>
        </table>
        <div class="ptvclear">
        </div>
    </div>
    <%} %>
    <%--tooooooooollltip--%>
    <div id="mystickytooltip" class="stickytooltip" style="left: 469px; top: 479px; display: none;
        border-top-color: black; border-right-color: black; border-bottom-color: black;
        border-left-color: black;">
        <div style="padding: 5px">
            <% foreach (SanPham item in
    (List<SanPham>)ViewData["sanphams"])
               {%>
            <div id="ptvsticky<%:item.MaSP %>" class="atip" style="display: none;">
                <div style="float: left;">
                    <%if
    (item.HinhAnh == "" || item.HinhAnh == null || item.HinhAnh == "noImage")
                      {%>
                    <img src="<%:Url.Content("~/Content/images/nophoto.gif")%>" alt="" width="220;" />
                    <%}
                      else
                      { %>
                    <img src="<%: item.HinhAnh%>" alt="" style="border: 0" />
                    <%} %>
                </div>
            </div>
            <%} %>
        </div>
    </div>
</asp:Content>
